package builder;

import java.util.ArrayList;
import java.util.List;

/**
 * @author gaopeng
 * @date 2019/12/8 2:05 下午
 */
public class Ditector {
    private List<String> sequent = new ArrayList<>(4);
    public BMWModel buildBmwA(){
        sequent.clear();
        sequent.add("start");
        sequent.add("stop");
        BMWBuilder bmwBuilder = new BMWBuilder();
        bmwBuilder.setSequent(sequent);
        return bmwBuilder.buildCarModel();
    }

    public BMWModel buildBmwB(){
        sequent.clear();
        sequent.add("start");
        sequent.add("alarm");
        sequent.add("stop");
        BMWBuilder bmwBuilder = new BMWBuilder();
        bmwBuilder.setSequent(sequent);
        return bmwBuilder.buildCarModel();
    }

    public BenzModel buildBenzA(){
        sequent.clear();
        sequent.add("start");
        sequent.add("alarm");
        BenzBuilder benzBuilder = new BenzBuilder();
        benzBuilder.setSequent(sequent);
        return benzBuilder.buildCarModel();
    }

    public BenzModel buildBenzB(){
        sequent.clear();
        sequent.add("start");
        sequent.add("engineBoom");
        sequent.add("stop");
        BenzBuilder benzBuilder = new BenzBuilder();
        benzBuilder.setSequent(sequent);
        return benzBuilder.buildCarModel();
    }
}
